home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Over 1,000 Windows 95 Programs
/
Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso
/
1470
/
3dframes.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1996-06-08
|
16KB
|
530 lines
VERSION 4.00
Begin VB.Form frm3DFrames
BorderStyle = 3 'Fixed Dialog
Caption = "VBMax 3D Effects Demo - Frames"
ClientHeight = 5745
ClientLeft = 840
ClientTop = 1365
ClientWidth = 7215
Height = 6150
Icon = "3DFrames.frx":0000
Left = 780
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5745
ScaleWidth = 7215
ShowInTaskbar = 0 'False
Top = 1020
Width = 7335
Begin VB.PictureBox picFrameBorderStyle
BorderStyle = 0 'None
Height = 1035
Left = 4920
ScaleHeight = 1035
ScaleWidth = 2115
TabIndex = 40
Top = 4140
Width = 2115
Begin VB.OptionButton optFrameEffect
Caption = "Recessed"
Height = 255
Index = 1
Left = 120
TabIndex = 31
Top = 480
Width = 1155
End
Begin VB.OptionButton optFrameEffect
Caption = "Raised"
Height = 255
Index = 0
Left = 120
TabIndex = 30
Top = 120
Value = -1 'True
Width = 915
End
End
Begin VB.CommandButton cmdClose
Cancel = -1 'True
Caption = "Close"
Height = 360
Left = 6165
TabIndex = 32
Top = 5340
Width = 900
End
Begin VB.PictureBox picFrameAlign
BorderStyle = 0 'None
Height = 1035
Left = 1800
ScaleHeight = 1035
ScaleWidth = 2835
TabIndex = 39
Top = 4140
Width = 2835
Begin VB.OptionButton optAlign
Caption = "Center"
Height = 255
Index = 2
Left = 120
TabIndex = 29
Top = 720
Width = 855
End
Begin VB.OptionButton optAlign
Caption = "Right Justify"
Height = 255
Index = 1
Left = 120
TabIndex = 28
Top = 420
Width = 1275
End
Begin VB.OptionButton optAlign
Caption = "Left Justify"
Height = 255
Index = 0
Left = 120
TabIndex = 27
Top = 120
Value = -1 'True
Width = 1095
End
End
Begin VB.PictureBox picFrameShadow
BorderStyle = 0 'None
Height = 1035
Left = 180
ScaleHeight = 1035
ScaleWidth = 1395
TabIndex = 38
Top = 4140
Width = 1395
Begin VB.OptionButton optShadow
Caption = "Light"
Height = 255
Index = 0
Left = 120
TabIndex = 25
Top = 120
Value = -1 'True
Width = 795
End
Begin VB.OptionButton optShadow
Caption = "Dark"
Height = 255
Index = 1
Left = 120
TabIndex = 26
Top = 480
Width = 795
End
End
Begin VB.PictureBox picFrameStyle
BorderStyle = 0 'None
Height = 2955
Left = 4920
ScaleHeight = 2955
ScaleWidth = 2115
TabIndex = 37
Top = 540
Width = 2115
Begin VB.OptionButton optEffect
Caption = "Normal"
Height = 255
Index = 0
Left = 120
TabIndex = 16
Top = 120
Width = 915
End
Begin VB.OptionButton optEffect
Caption = "Raised"
Height = 255
Index = 1
Left = 120
TabIndex = 17
Top = 420
Value = -1 'True
Width = 915
End
Begin VB.OptionButton optEffect
Caption = "Recessed"
Height = 255
Index = 2
Left = 120
TabIndex = 18
Top = 720
Width = 1155
End
Begin VB.OptionButton optEffect
Caption = "Embossed Raised"
Height = 255
Index = 3
Left = 120
TabIndex = 19
Top = 1020
Width = 1695
End
Begin VB.OptionButton optEffect
Caption = "Embossed Recessed"
Height = 255
Index = 4
Left = 120
TabIndex = 20
Top = 1320
Width = 1995
End
Begin VB.OptionButton optEffect
Caption = "Floating"
Height = 255
Index = 5
Left = 120
TabIndex = 21
Top = 1620
Width = 915
End
Begin VB.OptionButton optEffect
Caption = "Outline Right"
Height = 255
Index = 6
Left = 120
TabIndex = 22
Top = 1920
Width = 1335
End
Begin VB.OptionButton optEffect
Caption = "Outline Left"
Height = 255
Index = 7
Left = 120
TabIndex = 23
Top = 2220
Width = 1275
End
Begin VB.OptionButton optEffect
Caption = "Projected"
Height = 255
Index = 8
Left = 120
TabIndex = 24
Top = 2520
Width = 1155
End
End
Begin VB.PictureBox picFrameFont
BorderStyle = 0 'None
Height = 2955
Left = 1800
ScaleHeight = 2955
ScaleWidth = 2835
TabIndex = 34
Top = 540
Width = 2835
Begin VB.CommandButton cmdSelectFont
Caption = "Font Dialog"
Height = 315
Left = 1320
TabIndex = 15
Top = 2520
Width = 1155
End
Begin VB.CheckBox chkStrikeout
Caption = "Strikeout"
Height = 315
Left = 1320
TabIndex = 14
Top = 2100
Width = 1095
End
Begin VB.CheckBox chkUnderline
Caption = "Underline"
Height = 315
Left = 1320
TabIndex = 13
Top = 1740
Width = 1095
End
Begin VB.CheckBox chkItalic
Caption = "Italic"
Height = 315
Left = 1320
TabIndex = 12
Top = 1380
Width = 795
End
Begin VB.CheckBox chkBold
Caption = "Bold"
Height = 315
Left = 1320
TabIndex = 11
Top = 1020
Width = 795
End
Begin VB.ComboBox cboTextSize
Height = 1740
Left = 120
Style = 1 'Simple Combo
TabIndex = 10
Top = 1080
Width = 915
End
Begin VB.ComboBox cboFontNames
Height = 315
Left = 120
Sorted = -1 'True
Style = 2 'Dropdown List
TabIndex = 9
Top = 360
Width = 2535
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "Size:"
Height = 195
Left = 120
TabIndex = 36
Top = 840
Width = 345
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "Name:"
Height = 195
Left = 120
TabIndex = 35
Top = 120
Width = 465
End
End
Begin VB.PictureBox picFrameColor
BorderStyle = 0 'None
Height = 2955
Left = 180
ScaleHeight = 2955
ScaleWidth = 1395
TabIndex = 33
Top = 540
Width = 1395
Begin VB.CommandButton cmdSelectColor
Caption = "Color Dialog"
Height = 315
Left = 120
TabIndex = 8
Top = 2580
Width = 1155
End
Begin VB.OptionButton optColor
Caption = "Black"
ForeColor = &H00000000&
Height = 255
Index = 1
Left = 120
TabIndex = 0
Top = 120
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Red"
ForeColor = &H000000FF&
Height = 255
Index = 2
Left = 120
TabIndex = 1
Top = 420
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Green"
ForeColor = &H0000FF00&
Height = 255
Index = 3
Left = 120
TabIndex = 2
Top = 720
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Yellow"
ForeColor = &H0000FFFF&
Height = 255
Index = 4
Left = 120
TabIndex = 3
Top = 1020
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Blue"
ForeColor = &H00FF0000&
Height = 255
Index = 5
Left = 120
TabIndex = 4
Top = 1320
Value = -1 'True
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Magenta"
ForeColor = &H00FF00FF&
Height = 255
Index = 6
Left = 120
TabIndex = 5
Top = 1620
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Cyan"
ForeColor = &H00FFFF00&
Height = 255
Index = 7
Left = 120
TabIndex = 6
Top = 1920
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "White"
ForeColor = &H00FFFFFF&
Height = 255
Index = 8
Left = 120
TabIndex = 7
Top = 2220
Width = 1095
End
End
Attribute VB_Name = "frm3DFrames"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Dim mo3D As New C3D
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim i As Integer
CenterForm Me
With cboFontNames
For i = 0 To Screen.FontCount - 1
.AddItem Screen.Fonts(i)
Next i
End With
With cboTextSize
.AddItem "8"
.AddItem "10"
.AddItem "12"
.AddItem "14"
.AddItem "20"
.AddItem "24"
.AddItem "26"
.AddItem "32"
End With
With mo3D
.Style = gnNORMAL
.ForeColor = vbBlue
.Style = gnRAISED
End With
RedrawFrames
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set mo3D = Nothing
Set frm3DFrames = Nothing
End Sub
Sub RedrawFrames()
Dim nFrameStyle As Integer
If optFrameEffect(0).Value Then
nFrameStyle = gnRAISED
Else
nFrameStyle = gnRECESSED
End If
Cls
With mo3D
.Frame picFrameColor, "Color", nFrameStyle
.Frame picFrameAlign, "Alignment", nFrameStyle
.Frame picFrameFont, "Font", nFrameStyle
.Frame picFrameShadow, "Shadow", nFrameStyle
.Frame picFrameStyle, "Effect", nFrameStyle
.Frame picFrameBorderStyle, "Frame", nFrameStyle
End With
End Sub
Private Sub optColor_Click(Index As Integer)
mo3D.ForeColor = optColor(Index).ForeColor
RedrawFrames
End Sub
Private Sub cboFontNames_Click()
mo3D.FontName = cboFontNames.Text
RedrawFrames
End Sub
Private Sub cboTextSize_Click()
cboTextSize_Change
End Sub
Private Sub cboTextSize_Change()
mo3D.FontSize = Val(cboTextSize.Text)
RedrawFrames
End Sub
Private Sub chkBold_Click()
If chkBold.Value = vbChecked Then
mo3D.FontBold = True
Else
mo3D.FontBold = False
End If
RedrawFrames
End Sub
Private Sub chkItalic_Click()
If chkItalic.Value = vbChecked Then
mo3D.FontItalic = True
Else
mo3D.FontItalic = False
End If
RedrawFrames
End Sub
Private Sub chkStrikeout_Click()
If chkStrikeout.Value = vbChecked Then
mo3D.FontStrikethru = True
Else
mo3D.FontStrikethru = False
End If
RedrawFrames
End Sub
Private Sub optEffect_Click(Index As Integer)
mo3D.Style = Index
RedrawFrames
End Sub
Private Sub optShadow_Click(Index As Integer)
Select Case Index
Case 0: mo3D.Shadow = gnLIGHT_SHADOW
Case 1: mo3D.Shadow = gnDARK_SHADOW
End Select
RedrawFrames
End Sub
Private Sub optAlign_Click(Index As Integer)
mo3D.Alignment = Index
RedrawFrames
End Sub
Private Sub chkUnderline_Click()
If chkUnderline.Value = vbChecked Then
mo3D.FontUnderline = True
Else
mo3D.FontUnderline = False
End If
RedrawFrames
End Sub
Private Sub optFrameEffect_Click(Index As Integer)
RedrawFrames
End Sub
Private Sub cmdSelectColor_Click()
mo3D.SelectForeColor
RedrawFrames
End Sub
Private Sub cmdSelectFont_Click()
mo3D.SelectFont
RedrawFrames
End Sub